package com.example.demo.fallback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class OrderServiceFallbackFactory implements FallbackFactory<OrderServiceFallback> {
    @Override
    public OrderServiceFallback create(Throwable throwable) {
        log.error("enter orderServiceFallback");
        OrderServiceFallback orderServiceFallback = new OrderServiceFallback(throwable);
        return orderServiceFallback;
    }
}
